<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix='fmt' uri="http://java.sun.com/jsp/jstl/fmt" %>

<jsp:include page="/common/front/head.jsp" flush="true"/>
	<div align="left" class="content mdl-shadow--2dp" style="background: #fff;margin:24px 0;max-width: 1084px;width:90%;">
		<!-- /hmyuan/src/main/webapp/static/img/20170406149148123458e6329285f7b.png -->
		<div class="mdl-card__media mdl-color-text--grey-50" 
			style="background-image: url('static/img/20170406149148123458e6329285f7b.png');"> 
			<h4 style="min-height: 46px;font-size: 25px;line-height: 46px;" class="mdl-navigation__link articletitle">
		     	<a><i class="material-icons">&#xE89A;</i>&nbsp;&nbsp;标签云</a>
		    </h4> 
		</div>
		<hr style='margin: 0;border-top: 1px solid rgba(0,0,0,0.1);'>
		<div style="padding: 0%;height: 600px;">
         	<iframe id="tagsiframe" src="static/plugs/html5-ball-pool/index.jsp" height="100%">
         	</iframe>
         	<script type="text/javascript">
         	    document.getElementById("tagsiframe").addEventListener( "load", function(){
			         //代码能执行到这里说明已经载入成功完毕了
	       			$.post("taglistWithCount",function(data){
	       				var maxcount = 1;
	       				for ( var i in data) {
	       					maxcount = maxcount >= data[i].count ? maxcount : data[i].count;
						}
	       				for ( var i in data) {
	       					//设置文本链接
							data[i].url = basePath+"tag/"+data[i].id+"/"+data[i].name;
	       					//设置半径大小
							data[i].size = ((data[i].count+1)/maxcount)*120+20;
	       					console.log(data[i].size);
						}
	        			document.getElementById("tagsiframe").contentWindow.showtags(data);
	       			});
			         //这里是回调函数
			    }, false);
         	</script>
		</div>
   	</div>
<jsp:include page="/common/front/foot.jsp" flush="true"/>